<template>
  <div v-if="value" class="gl-popup pof vw100 vh100 l0 t0 zi10" @click="close" @touchmove.prevent>
    <slot name="out">
      <div class="popup-inner abs-mc" @click.stop>
        <slot></slot>
      </div>
    </slot>
  </div>
</template>

<script>
  export default {
    name: "GlPopup",
    data() {
      return {}
    },
    props: {
      value: {
        type: Boolean,
        default: false,
      },
    },
    watch: {
      value(val) {
      },
    },
    created() {
    },
    methods: {
      close() {
        this.$emit('close');
      },
    },
  }
</script>

<style scoped lang="less">
  .gl-popup {
    background-color: rgba(0, 0, 0, .3);
  }

  .popup-inner {
    background: #fff;
    box-shadow: 0 6px 18px 0 rgba(0, 0, 0, .1);
    border-radius: 20px;
  }
</style>